package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.HotelFacilityMapper;
import com.ruoyi.system.domain.HotelFacility;
import com.ruoyi.system.service.IHotelFacilityService;
import com.ruoyi.common.core.text.Convert;

/**
 * 酒店设施Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-03-19
 */
@Service
public class HotelFacilityServiceImpl implements IHotelFacilityService 
{
    @Autowired
    private HotelFacilityMapper hotelFacilityMapper;

    /**
     * 查询酒店设施
     * 
     * @param id 酒店设施主键
     * @return 酒店设施
     */
    @Override
    public HotelFacility selectHotelFacilityById(Long id)
    {
        return hotelFacilityMapper.selectHotelFacilityById(id);
    }

    /**
     * 查询酒店设施列表
     * 
     * @param hotelFacility 酒店设施
     * @return 酒店设施
     */
    @Override
    public List<HotelFacility> selectHotelFacilityList(HotelFacility hotelFacility)
    {
        return hotelFacilityMapper.selectHotelFacilityList(hotelFacility);
    }

    /**
     * 新增酒店设施
     * 
     * @param hotelFacility 酒店设施
     * @return 结果
     */
    @Override
    public int insertHotelFacility(HotelFacility hotelFacility)
    {
        return hotelFacilityMapper.insertHotelFacility(hotelFacility);
    }

    /**
     * 修改酒店设施
     * 
     * @param hotelFacility 酒店设施
     * @return 结果
     */
    @Override
    public int updateHotelFacility(HotelFacility hotelFacility)
    {
        return hotelFacilityMapper.updateHotelFacility(hotelFacility);
    }

    /**
     * 批量删除酒店设施
     * 
     * @param ids 需要删除的酒店设施主键
     * @return 结果
     */
    @Override
    public int deleteHotelFacilityByIds(String ids)
    {
        return hotelFacilityMapper.deleteHotelFacilityByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除酒店设施信息
     * 
     * @param id 酒店设施主键
     * @return 结果
     */
    @Override
    public int deleteHotelFacilityById(Long id)
    {
        return hotelFacilityMapper.deleteHotelFacilityById(id);
    }
}
